<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
</head>
<body>
	<script>
	 function toString(a,b) {
		 console.log(this)
		 console.log(a,b)

     console.log(this.name+'哈哈 端午节来啦'+this.age)
	 console.log(this.a+'哈哈 端午节来啦'+this.b)


	 console.log('------------------------')
	 }


	//  toString('xxx') //正常情况

	//  toString.call(null,'张三','xxx')

	//   toString.apply(null,['张三','xxx'])

	  var obj={
		  name:'zs',
		  age:18,
		  a:'xx',
		  b:'xx'
	  }
	  var obj2={
		  name:'zs1111',
		  age:18,
		  a:'xx',
		  b:'xx'
	  }

	toString.call(obj,obj.name,obj.age)
	toString.apply(obj2,[obj2.name,obj2.age])
	
	</script>
</body>
</html>